import Vue from 'vue'
import Vuex from 'vuex'
import user from './modules/user'
import VuexPersistence from 'vuex-persistedstate'
Vue.use(Vuex)

export default new Vuex.Store({
  state:{
  },
  getters: {
  },
  modules: {
    user
  },
  plugins: [VuexPersistence({
    key: 'Vuex-Persistence',
    storage: window.sessionStorage,
    reducer: state => {
      // console.log('VuexPersistence:state', state)
      //
      return {
        user: state.user,

      }
    }

  })]
})

